﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dbUtils.dto
{
    public class DiaDiem : objdto
    {
        public const int TYPE_SPEC = 0;
        public const int TYPE_DEFL = 1;
        public const int ID_ERROR = -1;
        int _id;
        string _ten;
        string _sdt;
        string _diachi;
        int _type;

        public DiaDiem()
        {
            _ten = string.Empty;
            _diachi = string.Empty;
            _sdt = string.Empty;
            _id = ID_ERROR;
            _type = TYPE_DEFL;
            _objType = OBJ_TYPE_DIADIEM;
        }

        public DiaDiem(string ten, string sdt, string diachi, int type)
        {
            _ten = ten;
            _sdt = sdt;
            _diachi = diachi;
            _type = (type==TYPE_SPEC)?TYPE_SPEC:TYPE_DEFL;
            _id = ID_ERROR;
            _objType = OBJ_TYPE_DIADIEM;
        }

        public DiaDiem(string ten, string sdt, string diachi)
        {
            _ten = ten;
            _sdt = sdt;
            _diachi = diachi;
            _type = TYPE_DEFL;
            _id = ID_ERROR;
            _objType = OBJ_TYPE_DIADIEM;
        }

        public int Type
        {
            get { return _type; }
            set { _type = value; }
        }

        public string Diachi
        {
            get { return _diachi; }
            set { _diachi = value; }
        }

        public string Sdt
        {
            get { return _sdt; }
            set { _sdt = value; }
        }

        public string Ten
        {
            get { return _ten; }
            set { _ten = value; }
        }

        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }
    }
}
